﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace ProjScan.Config
{
	// Token: 0x0200032E RID: 814
	internal class LuaCheckConfig : BaseConfig
	{
		// Token: 0x060012F5 RID: 4853 RVA: 0x0005B2C4 File Offset: 0x000594C4
		public override void Init()
		{
			this.luaScriptsRootPath = "";
			this.globalVariableAllowance = LuaCheckConfig.eGlobalVariableAllowance.Not;
			this.globals = null;
			this.readGlobals = null;
			this.luaPostfixes = null;
			bool flag = this.dicRuleConfig == null;
			if (flag)
			{
				this.dicRuleConfig = new Dictionary<string, RuleConfig>();
			}
			else
			{
				this.dicRuleConfig.Clear();
			}
		}

		// Token: 0x060012F6 RID: 4854 RVA: 0x00008E8E File Offset: 0x0000708E
		public override void LoadConfig(JObject data)
		{
			this._rootConfig = (JObject)data["Lua_Check"];
			this.ResolveRule();
		}

		// Token: 0x060012F7 RID: 4855 RVA: 0x00008EAE File Offset: 0x000070AE
		public override void SaveConfig(JObject data)
		{
			data.Add("Lua_Check", this.SaveJObjectRule());
		}

		// Token: 0x04000B51 RID: 2897
		public bool checkEnabled = true;

		// Token: 0x04000B52 RID: 2898
		public new Dictionary<string, RuleConfig> dicRuleConfig;

		// Token: 0x04000B53 RID: 2899
		public string macOSLuacheckPath = "/usr/local/bin/luacheck";

		// Token: 0x04000B54 RID: 2900
		public string luaScriptsRootPath = "";

		// Token: 0x04000B55 RID: 2901
		public LuaCheckConfig.eGlobalVariableAllowance globalVariableAllowance = LuaCheckConfig.eGlobalVariableAllowance.Not;

		// Token: 0x04000B56 RID: 2902
		public bool addGlobalCustom = false;

		// Token: 0x04000B57 RID: 2903
		public string globals = null;

		// Token: 0x04000B58 RID: 2904
		public string readGlobals = null;

		// Token: 0x04000B59 RID: 2905
		public string luaPostfixes = null;

		// Token: 0x04000B5A RID: 2906
		public bool noGlobal;

		// Token: 0x04000B5B RID: 2907
		public bool noUnused;

		// Token: 0x04000B5C RID: 2908
		public bool noRedefined;

		// Token: 0x04000B5D RID: 2909
		public bool noUnusedArgs;

		// Token: 0x0200032F RID: 815
		public enum eGlobalVariableAllowance
		{
			// Token: 0x04000B5F RID: 2911
			Not,
			// Token: 0x04000B60 RID: 2912
			AllowDefined,
			// Token: 0x04000B61 RID: 2913
			AllowDefinedTop
		}
	}
}
